$(function() {
	//初始化日期控件
	laydate.render({
		elem: "#birthday"
	});

	if (success === "true") {
		location.href = ctx + "/student/list";
		return;
	} else {
		if (error) {
			layer.alert(error);
		}
	}

	$("#submitBtn").click(function() {
		//数据校验
		var stuId = $("#stuId").val();
		if ($.trim(stuId) === "") {
			layer.alert("学号不允许为空");
			return;
		}

		var name = $("#name").val();
		if ($.trim(name) === "") {
			layer.alert("姓名不允许为空");
			return;
		}

		$("#stu-form").submit();
	});
});